﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@model WebBookmarkUI.Models.UIUserInfo
<script src="~/DomainJS/userInfo.js"></script>
<script type="text/javascript">
    var userImgUploadUrl = "@Url.Action("SaveUserImag")";
</script>
  <!-- content start -->
<div class="admin-content">
    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">个人资料</strong> / <small>Personal information</small></div>
    </div>
    <hr />
    <div class="am-g">
        <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
            <div class="am-panel am-panel-default">
                <div class="am-panel-bd">
                    <div class="am-g">
                        <div class="am-u-md-12">
                            <span>头像</span>
                        </div>
                        <div class="am-u-md-12">
                            @if (Model != null && !string.IsNullOrEmpty(Model.UserImagURL))
                            {
                                <img class="am-img-circle am-img-thumbnail" src='@Url.Content(@Model.UserImagURL)' alt="" />
                            }
                            else
                            {
                                <img class="am-img-circle am-img-thumbnail" src="http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/200/h/200/q/80" alt="">
                            }
                        </div>
                       <br />
                       <br />
                     
                        <div class="am-u-md-12">
                            <div class="am-form-group am-form-file">
                                <button type="button" class="am-btn am-btn-danger am-btn-sm">
                                    <i class="am-icon-cloud-upload"></i> 选择要上传的文件
                                </button>
                                <input id="uploadFile" type="file" accept=".JPG,.PNG,.JPEG" multiple>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
            <div class="am-form am-form-horizontal">
                <div class="am-form-group">
                    <label for="login-name" class="am-u-sm-3 am-form-label">用户名/User-Name</label>
                    <div class="am-u-sm-9">
                        @if (Model != null && !string.IsNullOrEmpty(Model.LoginName))
                        {
                            <input type="text" id="login-name" placeholder="用户名 / User-Name" value='@Model.LoginName'>
                        }
                        else
                        {
                            <input type="text" id="login-name" placeholder="用户名 / User-Name">
                        }
                        <small>输入你的用户名....</small>
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-name" class="am-u-sm-3 am-form-label">姓名 / Name</label>
                    <div class="am-u-sm-9">
                        @if (Model != null && !string.IsNullOrEmpty(Model.UserName))
                        {
                            <input type="text" id="user-name" placeholder="姓名 / Name" value='@Model.UserName'>
                        }
                        else
                        {
                            <input type="text" id="user-name" placeholder="姓名 / Name">
                        }
                        <small>输入你的昵称，让我们记住你。</small>
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-email" class="am-u-sm-3 am-form-label">电子邮件 / Email</label>
                    <div class="am-u-sm-9">
                        @if (Model != null && !string.IsNullOrEmpty(Model.UserEmail))
                        {
                            <input type="email" id="user-email" placeholder="输入你的电子邮件 / Email" value='@Model.UserEmail'>
                        }
                        else
                        {
                            <input type="email" id="user-email" placeholder="输入你的电子邮件 / Email">
                        }

                        <small>邮箱你懂得...邮箱也可以用来登陆哦。</small>
                    </div>
                </div>                
                <div class="am-form-group">
                    <label for="user-phone" class="am-u-sm-3 am-form-label">电话 / Telephone</label>
                    <div class="am-u-sm-9">
                        @if (Model != null && !string.IsNullOrEmpty(Model.Phone))
                        {
                            <input type="number" id="user-phone" placeholder="输入你的电话号码 / Telephone" value='@Model.Phone'>
                        }
                        else
                        {
                            <input type="number" id="user-phone" placeholder="输入你的电话号码 / Telephone">
                        }

                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-QQ" class="am-u-sm-3 am-form-label">QQ</label>
                    <div class="am-u-sm-9">
                       @if (Model != null && !string.IsNullOrEmpty(Model.QQ))
                       {
                          <input type="number" id="user-QQ" placeholder="输入你的QQ号码" value='@Model.QQ'>
                       }
                       else
                       {
                          <input type="number" id="user-QQ" placeholder="输入你的QQ号码">
                       }
                    </div>
                </div>
                <div class="am-form-group">
                    <label for="user-intro" class="am-u-sm-3 am-form-label">简介 / Intro</label>
                    <div class="am-u-sm-9">
                        @if (Model != null && !string.IsNullOrEmpty(Model.UserInfoComment))
                        {
                            <textarea class="" rows="5" id="user-intro" placeholder="输入个人简介">@Model.UserInfoComment
                            </textarea>
                        }
                        else
                        {
                            <textarea class="" rows="5" id="user-intro" placeholder="输入个人简介"></textarea>
                        }

                        <small>250字以内写出你的一生...</small>
                    </div>
                </div>
                <div class="am-form-group">
                    <div class="am-u-sm-9 am-u-sm-push-3">
                        <button type="button" class="am-btn am-btn-primary" id="btnSaveUserInfo">保存修改</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- content end -->


